package cn.melon.view.control;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import cn.melon.mod.roll.RollInfo;
import cn.melon.window.MainWindow;
import cn.melon.window.RollInfoModifyWindow;

/**
 * @ClassName: OpenRollModificationWindow
 * @author Hzy
 * 监听器，用于在学籍页面点击修改按钮时做出响应，打开修改页面。
 */
public class OpenRollModificationWindow implements ActionListener{
    public OpenRollModificationWindow(){
//        Do nothing
    }
    @Override 
    public void actionPerformed(ActionEvent e){
        JButton btn = (JButton) e.getSource();
        MainWindow m = (MainWindow) btn.getRootPane().getParent();
        RollInfo user = m.getUserRollInfo();
        RollInfoModifyWindow modify = new RollInfoModifyWindow(user, m);
        modify.setVisible(true);
        
    }
}
